<template>
  <view class="">
    <view class="custom_home_header" :style="{height:wh+'px'}">
      <image :style="'width:' +wid+'px;'+'height:' +wh+'px'" class="head-bg" src="@/static/bg.png">
        <view @click="NavigateTo" class="Personal_Center" :style="{'padding-top': (centerwh+10)+'px'}">
          <text id="icon" class="iconfont icon-Rrl_s_128"> </text>
          <view style="font-size: 16px;color: #ccc;padding-left: 10px;margin-top: 2px;">个人中心</view>
        </view>
      </image>
    </view>
  </view>
</template>

<script>
  import icon from '../../static/icon/font_4681875_w0si9sdsz3/iconfont.css'
  export default {
    /* name: "my-tabbar", */
    data() {
      return {
        wh: 0,
        wid: 0,
        _top: 0,
        centerwh: 0
      };
    },
    props: {},
    created() {
      this.getSystemPostion()
    },
    methods: {
      //获取屏幕位置
      getSystemPostion() {

        const sysInfo = uni.getWindowInfo();

        //this.safeArea = info.safeArea
        // console.log(sysInfo, "sysInfo")
        // 可用高度 = 屏幕高度 - navigationBar高度 - tabBar高度 - 自定义的search组件高度
        this.wh = sysInfo.windowHeight - (sysInfo.windowHeight - 200)
        this.wid = sysInfo.windowWidth
        this._top = sysInfo.windowTop
        this.centerwh = sysInfo.statusBarHeight
      },

      //跳转到登录
      NavigateTo() {
        // console.log("点我了")
        // 正确的页面跳转方式
        uni.navigateTo({
          url: '/pages/login/login'
        });
      },
    }
  }
</script>

<style lang="scss" scoped>
  //头部
  .custom_home_header {
    // height: 200px;

  }

  .head-bg {
    z-index: 98;
    position: absolute;
  }

  .Personal_Center {
    display: flex;
    padding-left: 10px;

    z-index: 99;
    position: absolute;
  }
</style>